package com.yuqian;

import com.yuqian.Resposoyory.OffOnlineMessageReponsitory;
import com.yuqian.bean.OffOnlineMessage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Administrator on 2017/7/31 0031.
 */
@RestController
public class HomeTest {

    @Autowired
    private OffOnlineMessageReponsitory reponsitory;


    @RequestMapping("/test")
    public String test(){
        OffOnlineMessage offOnlineMessage=new OffOnlineMessage();
        System.out.println("测试");
        offOnlineMessage.setUserId("1");
        offOnlineMessage.setState("0");
        offOnlineMessage.setContent("测试");
        offOnlineMessage.setMessageType("message");
        offOnlineMessage.settowhere("2");
        offOnlineMessage.setfromwhere("system");
        offOnlineMessage.setMessage("text");
        offOnlineMessage.setRecode("1");
        offOnlineMessage.setDeviceType("PC");
        reponsitory.save(offOnlineMessage);
        return "2131";
    }

}
